<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Edit DataSource</title>
</head>
<body>
<form method="POST" action="/doEditDataSource.do">
<c:set var="ds" value="${ dataSource }"></c:set>
	<p>
		<label>Name</label>
		<input type="text" name="name" value="${ds.name}"/>
	</p>
	<p>
		<label>DataBase Type</label>
		<select name="driverID">
			<c:forEach items="${databaseDrivers}" var="dbDriver">
				<option value="${dbDriver.id}">${dbDriver.name}</option>
			</c:forEach>
		</select>
	</p>
	<p>
		<label >Host</label>
		<input type="text" name="host" value="${ds.host }"/>
	</p>
	<p>
		<label>Port</label>
		<input type="text" name="port" value="${ds.port }"/>
	</p>
	<p>
		<label>DB Name</label>
		<input type="text" name="dbName" value="${ds.dbName }"></input>
	</p>
	<p>
		<label >User Name</label>
		<input type="text" name="userName" value="${ ds.userName }"></input>
	</p>
	<p>
		<label>password</label>
		<input type="password"" name="password" value="${ds.password }"/></input>
	</p>
	<p><input type="button" value="test" /> <input type="submit" value="Create" /></p>
</form>
</body>
</html>